#ifndef TABWIDGET_H
#define TABWIDGET_H



#include "AbstractModellingForm.h"



#include <ItemRoot.h>



#include <QTabWidget>
#include <QTreeView>



class TabWidget : public QTabWidget
{
    Q_OBJECT
public:

    enum TabType
    {
        TabType_FIRST = 0,
        CharacterTab = TabType_FIRST,
        CampaignTab,

        TabType_LAST = CampaignTab
    };


    TabWidget(QWidget *parent = 0);

    AbstractModellingForm* modellingForm(int index) const;


public slots:

    void onNew(int type);
    void onOpen();
    void onSave(int index = -1);
    void onSaveAs(int index = -1);
    void onClose(int index = -1);

    void onAdd();
    void onDelete();

    void onCreateGroup();
    void onCreateItem();
    void onCreateReference();


protected:

    void onCreate(ItemRoot* item = 0);


};

#endif // TABWIDGET_H
